package com.springboot.ww.platform.pd.order.api;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 描述：
 *
 * @author 🧑 ‍wanwei
 * @since 2024-05-14 15:57
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class PdOrderListResp implements Serializable {


    @JsonProperty("errorCode")
    private int errorCode;
    @JsonProperty("errorMsg")
    private String errorMsg;
    @JsonProperty("requestId")
    private String requestId;
    @JsonProperty("result")
    private ResultBeanX result;
    @JsonProperty("success")
    private boolean success;

    @JsonIgnoreProperties(ignoreUnknown = true)
    @Data
    public static class ResultBeanX implements Serializable {
        @JsonProperty("errorCode")
        private int errorCode;
        @JsonProperty("errorMsg")
        private String errorMsg;
        @JsonProperty("result")
        private ResultBean result;
        @JsonProperty("serverTime")
        private long serverTime;
        @JsonProperty("success")
        private boolean success;

        @JsonIgnoreProperties(ignoreUnknown = true)
        @Data
        public static class ResultBean implements Serializable {
            @JsonProperty("totalItemNum")
            private int totalItemNum;
            @JsonProperty("pageItems")
            private List<PageItemsBean> pageItems;

            @JsonIgnoreProperties(ignoreUnknown = true)
            @Data
            public static class PageItemsBean implements Serializable {
                @JsonProperty("parentOrderMap")
                private ParentOrderMapBean parentOrderMap;
                @JsonProperty("orderList")
                private List<OrderListBean> orderList;

                @JsonIgnoreProperties(ignoreUnknown = true)
                @Data
                public static class ParentOrderMapBean implements Serializable {
                    @JsonProperty("expectShipLatestTime")
                    private Long expectShipLatestTime;
                    @JsonProperty("parentOrderSn")
                    private String parentOrderSn;
                    @JsonProperty("parentOrderStatus")
                    private int parentOrderStatus;
                    @JsonProperty("parentOrderTime")
                    private Long parentOrderTime;
                    @JsonProperty("parentShippingTime")
                    private Long parentShippingTime;
                    @JsonProperty("regionId")
                    private int regionId;
                    @JsonProperty("siteId")
                    private int siteId;
                }

                @JsonIgnoreProperties(ignoreUnknown = true)
                @Data
                public static class OrderListBean implements Serializable {
                    @JsonProperty("goodsId")
                    private long goodsId;
                    @JsonProperty("goodsName")
                    private String goodsName;
                    @JsonProperty("orderSn")
                    private String orderSn;
                    @JsonProperty("orderStatus")
                    private int orderStatus;
                    @JsonProperty("quantity")
                    private int quantity;
                    @JsonProperty("skuId")
                    private long skuId;
                    @JsonProperty("spec")
                    private String spec;
                    @JsonProperty("thumbUrl")
                    private String thumbUrl;
                    @JsonProperty("productList")
                    private List<ProductListBean> productList;

                    @JsonIgnoreProperties(ignoreUnknown = true)
                    @Data
                    public static class ProductListBean implements Serializable {
                        @JsonProperty("extCode")
                        private String extCode;
                        @JsonProperty("productId")
                        private String productId;
                        @JsonProperty("productSkuId")
                        private String productSkuId;
                        @JsonProperty("soldFactor")
                        private int soldFactor;
                    }
                }
            }
        }
    }
}
